import { FC } from 'react'
import { Image } from 'antd-mobile'

interface ImageViewProps {
  src: string
  onClick?(): void
}

const ImageView: FC<ImageViewProps> = (props) => {
  const { src, onClick } = props
  return (
    <div style={{ width: '100%', height: '100%' }} onClick={onClick}>
      <Image width={'100%'} height={'100%'} lazy src={src} />
    </div>
  )
}

export default ImageView
